<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes"/>
    <xsl:template match="/">
        <xsl:apply-templates/>
    </xsl:template>

    <xsl:template name="look" match="looks">
        <xsl:for-each select="look">
            <xsl:sort select="originaltime" order="descending"/>

            <li id="{lookid}" data="manage-item" class="manage-item box">
                <div class="image">
                    <img src="{lookimage}"/>
                </div>
                <div class="look-info">
                    <div class="look-name">
                        <xsl:value-of select="lookname"/>
                    </div>
                    <div class="look-description">
                        <xsl:choose>
                            <xsl:when test="lookdescription">
                                <xsl:value-of select="lookdescription"/>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:text>No description</xsl:text>
                            </xsl:otherwise>
                        </xsl:choose>
                    </div>
                </div>
                <div class="button-wrapper">
                    <div class="inline button" data="delete">Delete</div>
                </div>
            </li>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>